<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<include file="Public/title" />
    <style type="text/css">
        .search{float:right;margin-right:30px;}
    </style>
</head>

<body>
<div class="mainWrap">
    <!--标题-->
    <form action="{:U('sync_agent')}" method="post" enctype="multipart/form-data">
    <div class="mainWrapHeader">
        <h1 class="mainWrapTit">{$seotitle}
            
            <a href="{:U('add')}" class="btn btn_edit"><span>添加用户</span></a>
            <label class="search">
                <input type="text" name="key" id="key" value="{$key}" class="sys_text"/>
                <a href="javascript:;" class="btn btn_search" id="search_btn"><span>搜索</span></a>
            </label>
        </h1>
    </div>
    </form>
    <!--标题-->
    
    <div class="mainWrapBd">
        
        <form action="{:U('batchDo')}" method="post" name="doForm" onsubmit="return batchConfirm(this);">
        <!--列表-->
        <table cellpadding="0" cellspacing="0" border="0" class="stdtable stdtablelist">
            <colgroup>
                <col style="width:50px;" />
                <col />
                <col />
                <col />
                <col />
                <col />
            </colgroup>
            <thead>
                <tr>
                    <th class="center">ID</th>
                    <th>手机号</th>
                    <th>昵称</th>
                    <th>头像</th>
                    <th>当前状态</th>
                    <th>设备号</th>
                    <th>邀请码</th>
                    <th>简介</th>
                    <th>备注</th>      
                    <th>添加时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="pages['lists']" id="fo">
                <tr>
                    <td align="center">{$fo['id']}</td>
                    <td>{$fo['mobile']}</td>
                    <td>{$fo['nickname']}</td>
                    <td>
                        <img src="{$fo['headimg']}" style="width:80px;height:80px;"/>
                    </td>
                    <td><if condition="$fo['now_status'] eq '1'">已邀请<else/>已注册</if></td>
                    <td>{$fo['imei']} <if condition="$fo['imei'] neq ''"><a href="{:U('cancel_imei',array('id'=>$fo['id']))}"><br/>取消绑定</a></if></td>
                    <td>{$fo['code']} <a href="{:U('sendcode',array('id'=>$fo['id']))}">发送</a></td>
                    <td>{$fo['description']}</td>                
                    <td>{$fo['remark']}</td>
                    <td>{$fo['addtime']|date="Y-m-d H:i",###}</td>                     
                    <td>
                        <a href="{:U('edit',array('id'=>$fo['id']))}">修改</a> &nbsp; 
                        <a href="{:U('delete',array('id'=>$fo['id']))}" onclick="return confirm('确认删除吗？')">删除</a> &nbsp;
                    </td>  
                </tr>
                </volist>
                <if condition="$pages['total'] eq 0">
                <tr>
                    <td align="center" class="data-nothing" colspan="9">暂无相关信息</td>
                </tr>
                </if>
            </tbody>
        </table>
        <!--列表-->
        
        <!--工具-->
        <div class="tableTools clearfix">
            <div class="tableOptions fl">
            </div>
            <div class="fr">
                {$pages['show']}
            </div>
        </div>
        <!--工具-->
        </form>
        
    </div>
    
</div>
</body>
<script type="text/javascript">
    window.onload = function(){
        document.getElementById('search_btn').onclick = function(){
            var key = document.getElementById('key').value;
            location.href = "{:U('user/index')}?key=" + key;
        }
    }
</script>
</html>